import apis from './indexapi2'
const BASE_URL = window.jdUrl || '' // 确保已正确定义 window.url
const api = apis(BASE_URL)
// jd5555登录
export const login = async () => {
    try {
        // 参数顺序：url, params, data
        let data = {
            "userName": "jd-ddc01",
            "pwd": "a281bee1d953914a1465a68a116471f3"
        }
        const response = await api.hDoPost('/Login/GetToken', '', data)
        return response
    } catch (error) {
        throw error // 重新抛出错误供外层处理
    }
}
//jd5555获取空调设备
export const getAirDeviceList = async (data) => {
    try {
        const response = await api.hDoPost('/api/Public/ExecMySql', data, "")
        return response
    } catch (error) {
        throw error // 重新抛出错误供外层处理
    }
}
